<?php
class JobList
{
    const STATUS_CREATED = 'created';
    const STATUS_STARTED = 'started';
    const STATUS_COMPLETE = 'complete';
    const STATUS_ERROR = 'error';
    
    private $sessionManager;
    
    public function __construct()
    {
        $this->sessionManager = new SessionManager();
    }
    
    public function addJob($name, $uri)
    {
        $jobs = $this->sessionManager->jobs;
        
        $jobs[] = array('name'=>$name, 'uri'=>$uri, 'status'=>self::STATUS_CREATED);
        
        $this->sessionManager->jobs = $jobs;
    }
    
    public function getJobs()
    {
        return $this->sessionManager->jobs;
    }
    
    public function updateJobStatii()
    {
        $jobs = $this->sessionManager->jobs;
        
        foreach ($jobs as $job)
        {
            Zend_Registry::get('logger')->debug('Checking job status for: '.$job['name']);
        }
    }
}